package com.zttek.photosShareProject.modules.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author Y
 * @since 2017-09-12
 */
public class Comment extends Model<Comment> {

    private static final long serialVersionUID = 1L;

	@TableField("create_time")
	private Date createTime;
	@TableField("update_time")
	private Date updateTime;
	@TableField("delete_time")
	private Date deleteTime;
    /**
     * default 1, 0 for invalid
     */
	private Integer valid;
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
	@TableField("share_id")
	private Long shareId;
	@TableField("user_id")
	private Long userId;
	private String content;
    /**
     * id of users ated, divided by comma
     */
	@TableField("at_user_ids")
	private String atUserIds;
	@TableField("total_praise")
	private Integer totalPraise;
    /**
     * id of user replied
     */
	@TableField("target_id")
	private Long targetId;


	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getDeleteTime() {
		return deleteTime;
	}

	public void setDeleteTime(Date deleteTime) {
		this.deleteTime = deleteTime;
	}

	public Integer getValid() {
		return valid;
	}

	public void setValid(Integer valid) {
		this.valid = valid;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getShareId() {
		return shareId;
	}

	public void setShareId(Long shareId) {
		this.shareId = shareId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getAtUserIds() {
		return atUserIds;
	}

	public void setAtUserIds(String atUserIds) {
		this.atUserIds = atUserIds;
	}

	public Integer getTotalPraise() {
		return totalPraise;
	}

	public void setTotalPraise(Integer totalPraise) {
		this.totalPraise = totalPraise;
	}

	public Long getTargetId() {
		return targetId;
	}

	public void setTargetId(Long targetId) {
		this.targetId = targetId;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Comment{" +
			"createTime=" + createTime +
			", updateTime=" + updateTime +
			", deleteTime=" + deleteTime +
			", valid=" + valid +
			", id=" + id +
			", shareId=" + shareId +
			", userId=" + userId +
			", content=" + content +
			", atUserIds=" + atUserIds +
			", totalPraise=" + totalPraise +
			", targetId=" + targetId +
			"}";
	}
}
